package Utility
{
	public class StringUtils
	{
		/*Author: Doug DiFilippo*/
		public static function Replace(originalString:String , toReplace:String , replaceText:String):String{
			return originalString.split(toReplace ).join(replaceText);
		}
		
		/*Author: Doug DiFilippo*/
		public static function Format(formatString:String , args:Array):String{
			var result:String = formatString;
			for (var i:int = 0; i < args.length; i++) {
				result = Replace(result , "{" + i + "}" , args[i].toString());
			}
			return result;
		}

	}
}